package com.pxst.internalReports.controller;

import com.pxst.internalReports.resp.ApprovedAccResp;
import com.pxst.internalReports.service.SysVrEntityService;
import com.pxst.resp.ApiResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;

/**
 * @author Chrissy
 * @description 已批准卡片报表相关接口
 * @since 2023-11-13 13:52:42
 */
@Api(tags = "已批准卡片报表相关接口")
@RestController
@RequestMapping("/internal")
@Validated
public class ApprovedAccController {

    @Resource
    private SysVrEntityService sysVrEntityService;

    @ApiOperation(value = "已批准卡片报表搜索接口", response = ApprovedAccResp.class)
    @GetMapping("/searchApprovedAcc")
    public ApiResp searchApprovedAcc(@RequestParam(value = "number") @NotBlank(message = "账户号码不能为空！") String number) {
        return sysVrEntityService.searchApprovedAcc(number);
    }
}
